<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8"/>
	<meta name="baidu-site-verification" content="JdMif0g2tL" />
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<title>angular</title>
	<script src="js/angular.min.js" charset="utf-8"></script>
</head>
<style type="text/css" media="screen">
	*{margin:0;padding: 0;font-size: 16px;}
</style>
<body ng-app="myApp">

<div ng-controller="appCtrl">
	<h1>{{colors | filter:'e'}}</h1>
	<h1>{{colors | filter:key}}</h1>
	<h1>{{colors | filter:firstCharIsUpper}}</h1>
	<h1>{{colors | filter:lastCharIsUpper}}</h1>
	<h1>{{colors | filter:thirdCharIsUpper}}</h1>
</div>	

<script type="text/javascript">
	var app =angular.module('myApp', []);
	app.controller('appCtrl', ['$scope', function($scope){
		$scope.colors=['red','greeN','bluE','YellOw','OranGe','White','black']
		$scope.key='o';
		$scope.firstCharIsUpper=function(value, index, arr){
			//函数的返回值作为判断条件
			//第一个value大写
			return value[0]===value[0].toUpperCase();
		};
		$scope.lastCharIsUpper=function(value, index, arr){
			return value[value.length-1]===value[value.length-1].toUpperCase();
		};
		$scope.thirdCharIsUpper=function(value, index, arr){
			if(value.length>=5){
				return value[4]===value[4].toUpperCase();
			}
		}
	}])
</script>
<script type="text/javascript">
	document.getElementsByTagName('html')[0].style.fontSize=window.screen.width/10+'px';
</script>
</body>
</html>
<!--应该 6.6-->